package cn.thornbird.orgsync.repository;

import cn.thornbird.orgsync.entity.Attachment;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface AttachmentRepository extends BaseRepository<Attachment>, JpaRepository<Attachment, String> {

    Attachment findFirstByFileUrl(String fileUrl);

    List<Attachment> findTop100ByFileUrlStartingWithOrderByCreatedAtDesc(String fileUrlPrefix);

}
